function AddPersonAssistant(sceneAssistant) {
	this.sceneAssistant = sceneAssistant;
}

AddPersonAssistant.prototype.setup = function(widget) {
	
	console.log("in setup");
	
	this.model = {
		name: "",
		category: 1,
		budget: 50
	}
	
	this.widget = widget;
	try {
	this.sceneAssistant.controller.setupWidget("personNameDialog",
		    this.nameAttributes = {
		      modelProperty: "name",
		      limitResize: true,
		      textReplacement: false,
			  textCase: Mojo.Widget.steModeTitleCase,
		      enterSubmits: false
		    },
		    this.model
		);
		
	this.sceneAssistant.controller.setupWidget("budget",
		    {
		      modelProperty: "budget",
		      limitResize: true,
		      textReplacement: false,
		      enterSubmits: false,
			  modifierState: Mojo.Widget.numLock
		    },
		    this.model
		);
		
	 this.sceneAssistant.controller.setupWidget("category",
        {
            choices: config.models.categories,
			modelProperty: "category",
			label: "Category"
			}, this.model
    	); 
	
	this.sceneAssistant.controller.setupWidget("okButton18",
		    {},
		    this.buttonModel = {
		      buttonLabel: "Add Person",
		      buttonClass: "affirmative",
		      disabled: false
		    }
		  );
	Mojo.Event.listen($('okButton18'), Mojo.Event.tap, this.checkIt.bind(this));
	} catch(e) {
		console.log(e.message);
	}
};

AddPersonAssistant.prototype.checkIt = function(event) {
	config.log("check");
	if (this.model.name == "")
		return;
	try {
		dbHelper.insertPerson(this.model, this.sceneAssistant.personAdded.bind(this.sceneAssistant));
		this.widget.mojo.close();
	} 
	catch (e) {
		config.log("after add person" + e.message);
	}
}

AddPersonAssistant.prototype.activate = function(event) {
	/* put in event handlers here that should only be in effect when this scene is active. For
	   example, key handlers that are observing the document */
	$('personNameDialog').mojo.focus();
};

AddPersonAssistant.prototype.deactivate = function(event) {
	/* remove any event handlers you added in activate and do any other cleanup that should happen before
	   this scene is popped or another scene is pushed on top */
};

AddPersonAssistant.prototype.cleanup = function(event) {
	/* this function should do any cleanup needed before the scene is destroyed as 
	   a result of being popped off the scene stack */
};

